import request from '@/utils/request'
// 查询企业的部门列表
export const getDepartments = function() {
  return request.get('/company/department')
}

// 获取员工简单列表
export const getEmployeeSimple = function() {
  return request.get('/sys/user/simple')
}

// 新增子部门
export const addDepartments = function(data) {
  return request.post('/company/department', data)
}

// 删除部门
export const delDepartment = function(id) {
  return request.delete(`/company/department/${id}`)
}

// 根据ID查询部门详情
export const getDepartmentById = function(id) {
  return request.get(`/company/department/${id}`)
}

// 更新部门数据
export const updateDepartments = function(data) {
  return request.put(`/company/department/${data.id}`, data)
}

